
package io.zhifei.modules.app.login.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.zhifei.modules.app.login.entity.UserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

/**
 * 用户
 *
 * @author Mark sunlightcs@gmail.com
 */
@Mapper
public interface LoginDao extends BaseMapper<UserEntity> {
    /***
     * 获取学员
     * @param tel
     * @return
     */
    Map<String, Object> getMember(String tel);

    /***
     * 获取客户
     * @param tel
     * @return
     */
    Map<String, Object> getCustomer(String tel);

    Map<String, Object> loginCount(@Param("userId") Long userId);

    int MACChec(@Param("id") Long id,
                @Param("loginDevice") String loginDevice,
                @Param("MAC") String MAC);

    /***
     * 查询学员，客户
     * @param userId
     * @return
     */
    Map<String, Object> getMemberOrCustomer(Long userId);

}
